<div ng-controller="repurchaseMngCtrl">
    <h1 class="page-header">回购管理</h1>


    <div class="row">
        <div class="col-xs-2">
            <div class="form-group">
                <label>用户名</label>
                <input class="form-control" ng-model="search.memberName"/>
            </div>
        </div>

        <div class="col-xs-2">
            <div class="form-group">
                <label>状态</label>
                <select  class="form-control" ng-model="search.status">
                    <option value="" selected="selected">-------------默认-------------</option>
                    <option value="1">回购创建</option>
                    <option value="2">回购价格确认</option>
                    <option value="3">完成</option>
                </select>
            </div>
        </div>

        <div class="col-xs-6 col-sm-3">
            <div class="form-group input-group">
                <a class="btn btn-primary" ng-click="getPagedDataAsync()" style="margin-top:24px">
                    搜索
                </a>
            </div>
        </div>
    </div>

    <div class="row">
        <table class="table table-bordered top5">
            <thead>
            <tr>
                <th>用户名</th>
                <th>产品名称</th>
                <th>回购数量</th>
                <th>回购价格</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            </thead>

            <tbody>
            <tr ng-repeat="item in list">
                <td ng-bind="item.memberName"></td>
                <td ng-bind="item.goodsName"></td>
                <td ng-bind="item.qty" align="center"></td>
                <td ng-bind=" item.price > 0 ? item.price.toFixed(2) + '元' : '' " align="center"></td>
                <td ng-bind="item.statusName"></td>
                <td>
                    <a class="btn btn-sm" ng-show="item.status == 1 || item.status == 2" ui-sref="index.repurchaseForm({id:item.id})">设置回购价格</a>
                </td>
            </tr>
            </tbody>
        </table>

        <pagination boundary-links="true"
                    max-size="5"
                    items-per-page="search.pageSize"
                    total-items="count"
                    ng-model="pageIndex"
                    ng-change="pagedCallback()"></pagination>
    </div>

</div>